CC = gcc
target=test
SRC = ${wildcard  *.c} 
OBJ = $(patsubst %.c, %.o, ${SRC})
CLIBS += -L /usr/local/lib/ffmpeg4.2/ -lavformat -lavcodec -lswscale -lavdevice -lavutil -lavfilter -lswresample -lm -lz
INC += -I /usr/local/include/ffmpeg4.2/
${target}: ${OBJ}
	${CC} ${OBJ} -o $@  $(INC) $(CLIBS) -lasound
$(OBJ):%.o:%.c
	$(CC) ${CFLAGS} -c $< -o $@ $(INC) $(CLIBS) -lasound
clean:
	rm -f ${OBJ}
	rm -f *.o
	rm -f *~
